home *** CD-ROM | disk | FTP | other *** search
/ Champak 43 / Vol 43.iso / games / superdog.swf / scripts / DefineSprite_65_en10 / frame_44 / DoAction.as
Encoding:
Text File  |  2007-06-25  |  483 b   |  24 lines

  1. onEnterFrame = function()
  2. {
  3.    if(_parent._parent.man._x < this.getBounds(_parent._parent).xMin)
  4.    {
  5.       this._x -= 10;
  6.    }
  7.    else
  8.    {
  9.       this._x += 10;
  10.    }
  11.    if(_parent._parent.man.getBounds(_parent._parent).yMin < this.getBounds(_parent._parent).yMax)
  12.    {
  13.       this._y -= 5;
  14.    }
  15.    else
  16.    {
  17.       this._y += 5;
  18.    }
  19.    if(Math.abs(_parent._parent.man._x - this.getBounds(_parent._parent).xMin) < 10)
  20.    {
  21.       this.removeMovieClip();
  22.    }
  23. };
  24.